home *** CD-ROM | disk | FTP | other *** search
/ Alde ADA 1: #1 / CCCC 8804 Volume 1 Number 1 - Alde.iso / C / MISC / FUNC / INKEY.ARC / TINKEY.C < prev   
Unknown  |  1983-09-25  |  1.0 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text


This file was not able to be converted.
This format is not currently supported by dexvert.

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
100% file data default
100% gt2 Kopftext: '/* program to test inkey routine */' default (weak)
100% xdgMime text/x-csrc default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 2f 2a 20 70 72 6f 67 72 | 61 6d 20 74 6f 20 74 65 |/* progr|am to te|
|00000010| 73 74 20 69 6e 6b 65 79 | 20 72 6f 75 74 69 6e 65 |st inkey| routine|
|00000020| 20 2a 2f 0d 0a 23 69 6e | 63 6c 75 64 65 20 22 63 | */..#in|clude "c|
|00000030| 73 69 67 2e 68 22 0d 0a | 23 69 6e 63 6c 75 64 65 |sig.h"..|#include|
|00000040| 20 22 73 74 64 69 6f 2e | 68 22 0d 0a 0d 0a 6d 61 | "stdio.|h"....ma|
|00000050| 69 6e 28 61 72 67 63 2c | 20 61 72 67 76 29 0d 0a |in(argc,| argv)..|
|00000060| 69 6e 74 20 61 72 67 63 | 3b 0d 0a 63 68 61 72 20 |int argc|;..char |
|00000070| 2a 61 72 67 76 5b 5d 3b | 0d 0a 7b 0d 0a 20 20 20 |*argv[];|..{.. |
|00000080| 20 20 20 20 20 69 6e 74 | 20 73 63 6e 2c 20 6e 6f | int| scn, no|
|00000090| 77 61 69 74 3b 0d 0a 20 | 20 20 20 20 20 20 20 63 |wait;.. | c|
|000000a0| 68 61 72 20 63 68 61 72 | 61 3b 0d 0a 0d 0a 20 20 |har char|a;.... |
|000000b0| 09 70 72 69 6e 74 66 28 | 22 54 65 73 74 20 6e 6f |.printf(|"Test no|
|000000c0| 77 61 69 74 20 72 65 61 | 64 20 6c 6f 6f 70 5c 6e |wait rea|d loop\n|
|000000d0| 22 29 3b 0d 0a 20 20 20 | 20 20 20 20 20 6e 6f 77 |");.. | now|
|000000e0| 61 69 74 20 3d 20 31 3b | 0d 0a 20 20 20 20 20 20 |ait = 1;|.. |
|000000f0| 20 20 77 68 69 6c 65 20 | 28 69 6e 6b 65 79 28 26 | while |(inkey(&|
|00000100| 63 68 61 72 61 2c 20 26 | 73 63 6e 2c 20 6e 6f 77 |chara, &|scn, now|
|00000110| 61 69 74 29 20 3d 3d 20 | 66 61 6c 73 65 29 0d 0a |ait) == |false)..|
|00000120| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 70 72 | | pr|
|00000130| 69 6e 74 66 28 22 57 61 | 69 74 69 6e 67 2e 2e 2e |intf("Wa|iting...|
|00000140| 5c 6e 22 29 3b 0d 0a 20 | 20 20 20 20 20 20 20 70 |\n");.. | p|
|00000150| 72 69 6e 74 66 28 22 46 | 69 6e 61 6c 6c 79 20 67 |rintf("F|inally g|
|00000160| 6f 74 20 63 68 61 72 61 | 63 74 65 72 20 20 25 63 |ot chara|cter %c|
|00000170| 20 25 78 5c 6e 22 2c 63 | 68 61 72 61 2c 20 73 63 | %x\n",c|hara, sc|
|00000180| 6e 29 3b 0d 0a 0d 0a 20 | 20 20 20 20 20 20 20 70 |n);.... | p|
|00000190| 72 69 6e 74 66 28 22 4f | 6e 65 20 77 61 69 74 20 |rintf("O|ne wait |
|000001a0| 49 2f 4f 20 63 6f 6d 69 | 6e 67 20 75 70 5c 6e 22 |I/O comi|ng up\n"|
|000001b0| 29 3b 0d 0a 20 20 20 20 | 20 20 20 20 6e 6f 77 61 |);.. | nowa|
|000001c0| 69 74 20 3d 20 30 3b 0d | 0a 20 20 20 20 20 20 20 |it = 0;.|. |
|000001d0| 20 69 6e 6b 65 79 28 26 | 63 68 61 72 61 2c 20 26 | inkey(&|chara, &|
|000001e0| 73 63 6e 2c 20 6e 6f 77 | 61 69 74 29 3b 0d 0a 20 |scn, now|ait);.. |
|000001f0| 09 70 72 69 6e 74 66 28 | 22 47 6f 74 20 63 68 61 |.printf(|"Got cha|
|00000200| 72 61 63 74 65 72 20 25 | 63 20 25 78 20 5c 6e 22 |racter %|c %x \n"|
|00000210| 2c 20 63 68 61 72 61 2c | 20 73 63 6e 29 3b 0d 0a |, chara,| scn);..|
|00000220| 20 20 20 20 20 20 20 20 | 65 78 69 74 28 30 29 3b | |exit(0);|
|00000230| 0d 0a 7d 0d 0a 1a 00 00 | 00 00 00 00 00 00 00 00 |..}.....|........|
|00000240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000260| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000270| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000280| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000290| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000300| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000320| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+